#ifndef __MAGNETICSENSORI2CBASE_H__
#define __MAGNETICSENSORI2CBASE_H__

#include "../../common/base_classes/Sensor.h"
#include "../../common/foc_utils.h"
#include "../../common/time_utils.h"
#include "device/iic/softwareiic.h"


class MagneticSensorI2CBase : public Sensor
{
public:
    explicit MagneticSensorI2CBase();
    virtual ~MagneticSensorI2CBase();

public:
    void init(SoftWareIIC *iic);

    // implementation of abstract functions of the Sensor class
    /** get current angle (rad) */
    float getSensorAngle() override;

protected:    
    virtual int getRawCount() = 0;

protected:
    float m_cpr = 0;
    SoftWareIIC *m_iic = nullptr;
};

#endif // __MAGNETICSENSORI2CBASE_H__
